package com.sc.nft.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sc.nft.entity.UserEcologyHatchRewardsRecords;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sc.nft.entity.vo.ecology.AdminPageUserRewardsRecordsVO;
import com.sc.nft.entity.vo.ecology.HatchRecordsRewardsDetailsVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * 生态-孵化-用户奖励记录表(sc_user_ecology_hatch_rewards_records)数据Mapper
 *
 * @author Sun
 * @since 2023-10-13 17:22:12
 * @description 由 Mybatisplus Code Generator 创建
*/
@Mapper
public interface UserEcologyHatchRewardsRecordsMapper extends BaseMapper<UserEcologyHatchRewardsRecords> {

    /**
     * 获取记录的奖励详情
     * @param userEcologyHatchRecordsId
     * @return
     */
    List<HatchRecordsRewardsDetailsVO> hatchRecordsDetails(@Param("userId") Long userId,@Param("userEcologyHatchRecordsId") Long userEcologyHatchRecordsId);

    /**
     * 获取用户奖励记录
     * @param page
     * @param startTime
     * @param endTime
     * @return
     */
    Page<AdminPageUserRewardsRecordsVO> getPageUserRecordsRecords(Page page, @Param("userEcologyHatchRecordsId") Long userEcologyHatchRecordsId, @Param("startTime")Date startTime, @Param("endTime")Date endTime);

    /**
     *
     * @param userId
     * @param recordsId
     * @return
     */
    int getIsExistByUserIdAndRecordsId(@Param("userId") Long userId,@Param("recordsId") Long recordsId);
}
